<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="<%=path %>/static/css/css.css?1" />
<link rel="stylesheet" type="text/css" href="<%=path %>/static/jquery-ui/jquery-ui.min.css" />
<script type="text/javascript" src="<%=path %>/static/js/json2.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/jquery.js"></script>
<script type="text/javascript" src="<%=path %>/static/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="<%=path %>/static/layer/layer.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/gridview.js?v=1"></script>
<script type="text/javascript" src="<%=path %>/static/js/formview.js?v=1"></script>
<script type="text/javascript" src="<%=path %>/static/js/tool.js"></script>
<script type="text/javascript" src="<%=path %>/static/js/validate.js"></script>
<SCRIPT type="text/javascript">
    <!--
	var gridSetting = {
			id:'qhSysParLeaveGrid',
			po:"QhSysParLeave",
			title:'尾狐等级列表',
			height:'auto',
			service:"uiServices!listSimple",
			tbId:"leaveTb",
			hideCheckbox:true,
			pageInfo: {
				records: 12,//auto表示根据容器高度自动判断
				orderby : "id"
			},
			oper:{
                isDisplay:true,
            	operName:"编辑",
            	url:"",
            	cssClass:"Operation",
            	width:60
            },
			fields:[
			   {	name:'id',
					hide:true
			   }
			   ,{
                  name:'name',
                  descs:"等级",
                  align:'center'
               }
			   ,{
                   name:'inviteCnt',
                   descs:"成功邀请",
                   align:'center'
               },{
				   name: 'leaveName',
				   descs:"被邀请人类型",
				   align:'left'
			   }
			   ,{
               	   name: 'taskCnt',
               	   descs:"完成任务",
               	   align:'left'
               }
               ,{
                   name: 'percent',
                   descs:"显示比例（%）",
                   align:'center'
               }
               ,{
                   name: 'usePer',
                   descs:"采用比例（%）",
                  align:'center'
               }
			]
		};
	var grid;
    $(document).ready(function(){
    	grid = new GridView("list",gridSetting,"list");
		grid.init();
		var data = [];
		grid.load({data:data});

		ajustHeight();

    });

    function afterLoad_leaveTb(){
       $(".rcon2 .mtable tbody tr").each(function(){
          var id=$(this).attr("recordid");
          var html="<a href=<%=path %>/public/common/r2.htmls?page=syspar/sys_par_leave_edit&id="+id+" >编辑</a>";
          $(this).find(".Operation").html(html);


       });
    }

    //-->
</SCRIPT>
</head>

<body>
<ul class=tab_nav>
  <li>
    <a class="current" href="javascript:void(0)">尾狐等级</a>
  </li>
</ul>
<div class="contrainer">
<div id="formview" class="rbox1"></div>
<div id="list" class="rbox2"></div>
</div>
<script type="text/javascript" src="<%=path %>/static/js/underscore.js"></script>
<script type='text/javascript' src='<%=path %>/static/My97DatePicker/WdatePicker.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/interface/BaseDwr.js'></script>
<script>
   $(function(){
      $("#queryBtn").click(function(){
         var type = $(".ctable").find(":input[name=type]").val();

         var data = [];
         if(type!==""){
            data.push({r:"=",name:'type',value:type});
         }

         grid.load({data:data});
         ajustHeight();
      });
   });
</script>
</body>
</html>